package com.ctsi.auth.event;

import com.ctsi.commons.util.UtilDateTime;

import java.sql.Date;

/**
 * @author zhangjw
 * @className LoginInfoResouce
 * @description 登陆信息
 * @date 2019/3/2 13:43
 **/
public class LoginInfoResouce {

    private String id;

    private String loginName;

    private String clientIp;

    private String deviceName;

    private String deviceId;

    private Long loginDateTime;

    private Integer year;

    private Integer mounth;

    private Integer day;

    public LoginInfoResouce() {
        this.loginDateTime = System.currentTimeMillis();
        this.year = Integer.parseInt(UtilDateTime.getYear(new Date(this.loginDateTime)));
        this.mounth = Integer.parseInt(UtilDateTime.getMonth(new Date(this.loginDateTime)));
        this.day = Integer.parseInt(UtilDateTime.getDay(new Date(this.loginDateTime)));
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getClientIp() {
        return clientIp;
    }

    public void setClientIp(String clientIp) {
        this.clientIp = clientIp;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public Long getLoginDateTime() {
        return loginDateTime;
    }

    public void setLoginDateTime(Long loginDateTime) {
        this.loginDateTime = loginDateTime;
    }

    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }

    public Integer getMounth() {
        return mounth;
    }

    public void setMounth(Integer mounth) {
        this.mounth = mounth;
    }

    public Integer getDay() {
        return day;
    }

    public void setDay(Integer day) {
        this.day = day;
    }
}
